﻿#pragma once

class CBuffer10Wrapper : public CBaseWrapper
{
public:
    float sumCounter;     // x7 -> 28
    double sumHeight;     // x8,9 -> 32,36
    double sumArea;       // x10,x11 -> 40,44
    float normalDiffH05;  // x12 -> 48
    int32_t type1Counter; // x13 -> 52
    int32_t type2Counter; // x14 -> 56
    int32_t type0Counter; // x15 -> 60
    CalcUnit calcUnit1;   // x16 -> 64
    // typedef struct tagBuffer10{
    //     int32_t time;      // x16 -> 64
    //     float height;   // x17 -> 68
    //     double area;    // x18 -> 72
    //     int32_t type;       // x20 -> 80
    //     float reserved; // x21 -> 84
    // } Buffer10;
    CalcUnit calcUnit2; // 22 -> 88
    // typedef struct tagBuffer10{
    //     int32_t time;      // 22 -> 88
    //     float height;   // 23 -> 92
    //     double area;    // 24 -> 96
    //     int32_t type;       // 26 -> 104
    //     float reserved; // 27 -> 108

    CBuffer10Wrapper();

    void printSelf(char *captionUpper, int32_t deep);

    // sub_1001B200
    CBuffer10Wrapper *init(int32_t len);

    // sub_1001E0A0
    CBuffer10Wrapper *init_(int32_t len);

    // sub_100010BE
    CBuffer10Wrapper *clean();

    // sub_100196E0
    CBuffer10Wrapper *cleanCalcUnit1();

    // sub_10019720
    CBuffer10Wrapper *cleanCalcUnit2();

    // sub_1001BA60
    double getNormalDiffH05();

    // sub_10001738
    int32_t setCalcUnit1(TDLLResultListItem *pRes, float normalizeSlope);

    // sub_10001560
    int32_t setCalcUnitValue1(CalcUnit *cu, TDLLResultListItem *pRes, float normalizeSlope);

    // sub_100018A8
    int32_t setCalcUnitValue2(CalcUnit *cu, TDLLResultListItem *pRes, float normalizeSlope);

    // sub_1000145D
    int32_t setCalcUnitStartTime1(CalcUnit *cu, TDLLResultListItem *pRes, float normalizeSlope);

    // sub_100017A2
    int32_t setCalcUnitStartTime2(CalcUnit *cu, TDLLResultListItem *pRes, float normalizeSlope);

    // unknown_libname_2
    int32_t getUnit1TimeEnd();

    // sub_1001A550
    double getUnit1Height();

    // sub_1001A570
    double getUnit1Area();

    // sub_10019D60
    int32_t getBuffer10Time(int32_t idx);

    // sub_100197D0
    double getBuffer10Height(int32_t idx);

    // sub_1001A200
    double getBuffer10Area(int32_t idx);

    // sub_1001B9A0
    int32_t checkType2Counter(int32_t checkType2);

    // sub_1001BAE0
    int32_t checkType1Counter(int32_t checkType1);

    // sub_10001392
    int32_t accBuffer10Value(int32_t time, int32_t val, int32_t groupCount, int32_t factor);

    // sub_100197F0
    CBuffer10Wrapper *setNormalDiffH05();

    // sub_100197A0
    double getBuffer10DiffHeight(int32_t bufferNo1, int32_t bufferNo2);

    // sub_1001A980
    int32_t getBuffer10DiffTime(int32_t bufferNo1, int32_t bufferNo2);

    // sub_10001318
    void deductArea(int32_t diploidTime, int32_t moreTime, int32_t *pDarea);

    // sub_1000112E
    void countBuffer10Type(float horizValue);

    // sub_10019760
    void setBuffer10Type(int32_t bufferNo, int32_t type);

    // sub_10019780
    int32_t getBuffer10Type(int32_t bufferNo);

    // sub_10019D80
    int32_t hasSalientPoint(float minHDiff);

    // sub_10019EC0
    int32_t checkCurvature(int32_t positive);

    // sub_10019E00
    int32_t isDiffH10Exceed(int32_t negative);

    // sub_10019E50
    int32_t hasSalientPointType2(float minHDiff);

    // sub_10001A80
    int32_t setCalcUnit2(TDLLResultListItem *pRes, float normalizeSlope);

    // sub_10001297
    int32_t searchMaximalHeightIndex(int32_t tailIndex, int32_t headIndex);

    // sub_10001216
    int32_t searchMinimalHeightIndex(int32_t tailIndex, int32_t headIndex);

    // sub_1001A590
    int32_t getUnit2TimeEnd();

    // sub_1001A5B0
    double getUnit2Height();

    // sub_1001A5D0
    int32_t getType1Counter();

    // sub_1001C550
    int32_t checkType0Counter();

    // sub_1001BD60
    int32_t isDiffHeightExceedThreshold(int32_t threshold);
};